# -*- coding: utf-8 -*-
"""
Created on Fri Jul 15 21:05:22 2016

@author: Administrator
"""
dic=open('dict.txt')
readdic=dic.readlines()
diclist=list(readdic)

text=open('testtxt.txt')
readtext=text.readlines()
textlist=list(readtext)

line1='南苏丹枪声里的中国人:女店主被推床上衣服被撕'
s2=' '
while len(line1)>0:
    strlen=len(line1)
    strlen2=len(line1)
    s1=line1
    while len(s1)>0:
        s3=s1+'\n'
        if s3 in diclist:
            s2=s2+s1+'/'
            line1=line1[len(s1):strlen2]
            s1=''
        else:
            if len(s1)>1:    
            
                strlen=strlen-1
                s1=s1[0:strlen]
            else:
                s2=s2+s1+'/'
                line1=line1[len(s1):strlen2]
                s1=''

print(s2)
'''
if s1 in diclist:    
    print('yes right')
else:
    print('fuck wrong')
'''